home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
menus
/
envmnu11.zip
/
README.BAT
< prev
Wrap
DOS Batch File
|
1992-11-16
|
5KB
|
167 lines
@echo off
cls
echo
echo README.BAT uses EnviMenu.exe as an example of how to use EnviMenu. These
echo batch files use quite a few environment variables, and so if you have trouble
echo running it then you should increase your environment size:
echo COMMAND.COM /E:XXXX where XXXX is environment size
echo
echo There are two hidden options on this ReadMe.bat menu. Type "SECRET" or "HID"
echo to find these options.
echo
pause
set MENU_OPTION=Help
:MenuRepeat
envimenu MENU_OPTION README.BAT /PRE :~ /COM :! /SORT /Prompt "Whaddya want? (Quit to leave)" /Hid @@@
if errorlevel 1 GOTO ~Quit
GOTO ~%MENU_OPTION%
REM *********************************************************************
REM ** THE FOLLOWING LINES ARE THE OPTIONS THAT WILL BE MADE AVAILABLE **
REM ** ON THE MENU. **
REM *********************************************************************
:~Spawn DOS Shell
:!Load command.com until you type exit
command.com
GOTO MenuRepeat
REM Screen Lines is an example of a menu within a menu
:~Screen Lines
:!Set screen to 25, 43, or 50 lines
:#25
:#43
:#50
set LINE_COUNT=
envimenu LINE_COUNT README.BAT /PRE :# /Prompt "How many screen lines?" /Esc
if a%LINE_COUNT%z==az GOTO MenuRepeat
mode 80,%LINE_COUNT%
set LINE_COUNT=
GOTO MenuRepeat
:~Date & Time
:!Set computer's data and time
cls
date
time
GOTO MenuRepeat
:~Check Disk Integrity
:!Run ChkDsk on current drive
cls
chkdsk
pause
GOTO MenuRepeat
REM THE FOLLOWING EIDT LINES HAVE ALT-255 INSTEAD OF SPACE SO THAT
REM THEY HAVE DISTINCT LABELS
:~Edit AutoExec
:!Edit the file: C:\AUTOEXEC.BAT
edit C:\AUTOEXEC.BAT
GOTO MenuRepeat
:~Edit Config
:!Edit the file: C:\CONFIG.SYS
edit C:\CONFIG.SYS
GOTO MenuRepeat
:~View My Home Menu
:!View (but not really execute) the MAIN menu my family uses at home
call HomeMenu.bat
GOTO MenuRepeat
:~Help
:!View help screen from executing "ENVIMENU.EXE /?"
cls
ENVIMENU.EXE /? | more
pause
GOTO MenuRepeat
REM The following item is a hidden option for this menu
:~@@@Secret
cls
echo
echo Congratulations! You found the secret menu option and all you got was this
echo lousy message.
echo
pause
GOTO MenuRepeat
:~@@@Hid
cls
echo
echo So you entered HID. Big deal! Who told you to do this?
echo
pause
GOTO MenuRepeat
:~AttrMenu
:!Example BATCH file AttrMenu.bat, which selectively changes file attributes
cls
CALL AttrMenu
echo
echo About to remove archive attribute on chosen files in this directory.
echo
echo From the command line, this would be: "AttrMenu * -a" or "AttrMenu -a"
echo
pause
CALL AttrMenu -a
cls
echo
echo About to set archive attribute on chosen files in this directory.
echo
echo From the command line, this would be: "AttrMenu * +a" or "AttrMenu +a"
echo
pause
CALL AttrMenu +a
GOTO MenuRepeat
:~CDMenu
:!Example BATCH file CDMenu.bat, which selectively changes directory along tree
cls
echo
echo CDMENU will only work after you change directories if EnviMenu.exe is
echo somewhere in your path. If you do change directories, then after this
echo demo of CDMenu you will want to return to the current directory to
echo Continue ReadMe.bat.
echo
pause
call cdmenu.bat
if exist ReadMe.bat GOTO MenuRepeat
GOTO End
:~Quit
:!Return to the DOS shell
set MENU_OPTION=
cls
echo EnviMenu Copyright Nombas 1992
echo
echo EnviMenu is but a tiny part of the upcoming CEnvi shareware product.
echo CEnvi is designed to appease envious C programmers, or those who are
echo envious of C programmers, in the batch environment. CEnvi will allow
echo C-like language extensions to batch files without modifying command.com
echo or using extra memory.
echo
echo I am making this small piece of CEnvi available only to answer a
echo InterNet question about "Which Menuing System do YOU use?". If EnviMenu
echo helps you then go ahead and use it for free. If you send $5 for EnviMenu,
echo then you will be registered as an EnviMenu user. Registered users
echo will receive updates on the future of CEnvi and will be eligible to
echo receive CEnvi, when available, for $5 off the shareware price (expected
echo to be $10 to $25, with tons of example files and utilities created using
echo CEnvi). Registered users will also get EnviAsk.exe which allows formatted
echo input of environment variables. Together with EnviMenu, EnviAsk just about
echo eliminates the need for the computer illiterate to ever see the DOS prompt.
echo
echo Nombas (otherwise known as Brent Noorda) can be reached at:
echo mail: Brent Noorda / Nombas / 36 Tainter St. / Medford, MA 02155 USA
echo phone: (617)391-5289 email: bsn@world.std.com
echo
pause
goto End
:End